/**
 * @File Name: Communication.cpp
 * @brief  
 * @Author : LiWanglin email:lwl510ll@163.com
 * @Version : 1.0
 * @Creat Date : 2024-01-28
 * 
 * @copyright Copyright (c) 2024 LiWanglin
 */

#include "communication.h"
#include <stdio.h>


Communication::Communication(/* args */)
{
}

Communication::~Communication()
{
}


int Communication::get_fd()
{
    return fd;
}

CMResult Communication::get_name(char *n)
{
    if(nullptr == n) {
        return CM_NULL_POINT;
    }

    sprintf(n, "%s", name);
    return CM_OK;
}

CMResult Communication::set_name(char *n)
{
    if(nullptr == n) {
        return CM_NULL_POINT;
    }

    sprintf(name, "%s", n);
    return CM_OK;
}